import {createRouter, createWebHistory} from 'vue-router'
const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path:'/login',
            component:() => {
                return import("@/views/login/index.vue");
            },
            name:'login',
        },
        {
            path:'/',
            component:() => import ("@/views/home/index.vue"),
            name:'layout'
        },
        {
            path:'/404',
            component:() => import("@/views/404/index.vue"),
            name:'404'
        },
        {
            path: '/:pathMatch(.*)*', // Vue 3 新语法，匹配任意路径
            redirect: '/404' // 或直接跳转首页：redirect: '/'
        }
    ],

})


export default router